package com.ruoyi.system.domain;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.annotation.Excels;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.domain.entity.TBProductType;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.beans.Transient;
import java.util.List;

/**
 * 设备管理对象 t_b_device
 * 
 * @author pspyy
 * @date 2022-03-07
 */
public class TBDevice extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long id;

    /** 设备名称 */
    @Excel(name = "设备名称")
    private String deviceName;

    /** 设备编码 */
    @Excel(name = "设备编码")
    private String deviceCode;

    /** 是否售出 **/
    @Excel(name = "是否售出",readConverterExp = "0=未售出,1=已售出",combo = "未售出,已售出",type = Excel.Type.EXPORT)
    private String isSell;

    /** 设备批次 */
    @Excel(name = "设备批次")
    private String deviceBath;

    /** 产品类型id */
    private Long productTypeId;

    /** 设备描述 */
    @Excel(name = "设备描述")
    private String deviceDesc;

    @Excels({
            @Excel(name = "产品类型名称", targetAttr = "productName",type = Excel.Type.EXPORT),
    })
    private TBProductType product;

    @Excel(name = "产品类型名称",type = Excel.Type.IMPORT)
    private String productName;


    private Long[] ids;

    public String getIsSell() {
        return isSell;
    }

    public void setIsSell(String isSell) {
        this.isSell = isSell;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setDeviceName(String deviceName) 
    {
        this.deviceName = deviceName;
    }

    public String getDeviceName() 
    {
        return deviceName;
    }
    public void setDeviceCode(String deviceCode) 
    {
        this.deviceCode = deviceCode;
    }

    public String getDeviceCode() 
    {
        return deviceCode;
    }
    public void setDeviceBath(String deviceBath) 
    {
        this.deviceBath = deviceBath;
    }

    public String getDeviceBath() 
    {
        return deviceBath;
    }
    public void setProductTypeId(Long productTypeId) 
    {
        this.productTypeId = productTypeId;
    }

    public Long getProductTypeId() 
    {
        return productTypeId;
    }
    public void setDeviceDesc(String deviceDesc) 
    {
        this.deviceDesc = deviceDesc;
    }

    public String getDeviceDesc() 
    {
        return deviceDesc;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("deviceName", getDeviceName())
            .append("deviceCode", getDeviceCode())
            .append("deviceBath", getDeviceBath())
            .append("productTypeId", getProductTypeId())
            .append("deviceDesc", getDeviceDesc())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("updateTime", getUpdateTime())
            .append("product", getProduct())
            .append("productName", getProductName())
            .toString();
    }

    public TBProductType getProduct() {
        return product;
    }

    public void setProduct(TBProductType product) {
        this.product = product;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    @Transient
    public Long[] getIds() {
        return ids;
    }

    public void setIds(Long[] ids) {
        this.ids = ids;
    }
}
